{% extends "adminlayout.html" %}
{% block adminlayout %}

    <div class="panel panel-default" style="margin-bottom: 400px;">
        <div class="panel-heading">
            <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
            用户列表
            <!--搜索框-->
            <div class="col-lg-6" style="width: 300px;float: right;">
                <form method="get">
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="通过用户名搜索" name="q"
                               value="{{ kuang_data }}">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="submit">
                            <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                            </button>
                        </span>
                    </div>
                </form>
            </div>
        </div>

        <!-- Table -->
        <table class="table table-bordered">
            <thead>
            <tr>
                <th style="text-align: center;line-height: 20px;font-size: 20px">编号</th>
                <th style="text-align: center;line-height: 20px;font-size: 20px">用户名</th>
                <th style="text-align: center;line-height: 20px;font-size: 20px">密码</th>
                <th style="text-align: center;line-height: 20px;font-size: 20px">电话</th>
                <th style="text-align: center;line-height: 20px;font-size: 20px">邮箱</th>
                <th style="text-align: center;line-height: 20px;font-size: 20px">操作</th>
            </tr>
            </thead>
            <tbody>
            {% for obj in queryset %}
                <tr>
                    <td style="text-align: center;">{{ obj.id }}</td>
                    <td style="text-align: center;">{{ obj.username }}</td>
                    <td style="text-align: center;">************</td>
                    <td style="text-align: center;">{{ obj.dianhua }}</td>
                    <td style="text-align: center;">{{ obj.email }}</td>
                    <td style="text-align: center;">
                        <a class="btn btn-primary btn-xs" href="/Adminuser/{{ obj.id }}/edit/"
                           onclick="javascript:return edit();">修改</a>
                        <a class="btn btn-danger btn-xs" href="/Adminuser/{{ obj.id }}/delete/"
                           onclick="javascript:return del();">删除</a>
                    </td>
                </tr>

            {% endfor %}

            </tbody>
        </table>
        <ul class="pagination" style="margin-top: 50px;float: right;">
            {{ page_string }}
        </ul>
    </div>

{% endblock %}